@echo off
set curdir=%~dp0
cd /d %curdir%
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit


REM this is to for user to choose
:choice
echo ## choose:
echo 1:install service
echo 2:start service
echo 3:stop service
echo 4:remove service
echo q:quit
set /P action=choose your action:
if /I "%action%"=="1" goto action1
if /I "%action%"=="2" goto action2
if /I "%action%"=="3" goto action3
if /I "%action%"=="4" goto action4
if /I "%action%"=="q" goto quit

:action1
%~dp0WinPollManager.exe install
REM WinPollManager.exe install
echo ----service installed----
goto choice

:action2
%~dp0WinPollManager.exe start
echo ----service started----
goto choice

:action3
%~dp0WinPollManager.exe stop
echo ----service stoped----
goto choice

:action4
%~dp0WinPollManager.exe remove
echo ----service removed----
goto choice

:quit
echo exiting...
pause
exit